package com.example.pojo.entity;

import cn.hutool.core.annotation.Link;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.example.pojo.utils.ProcIns;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import java.time.LocalDateTime;
import java.util.List;

/**
 * TODO
 *
 * @author ding
 * @since 2024/7/13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Approval {

    @TableId(type =  IdType.AUTO)
    private Integer id;
    /** 申请项目id */
    private Integer projectId;
    /** 申请施工队id */
    private Integer teamId;
    /** 审批状态 */
    private String status;
    /** 附件 */
    private String file;
    /** */
    private Integer planId;
    /** 申请原因 */
    private String description;
    /** 申请 */
    private String procInstId;
    /** 申请人id */
    private Integer applicantId;
    /** 审批类型 */
    private String type;

    /**  */
    @TableField(exist = false)
    private List<ProcIns> procInsList;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /** 申请人名称 */
    @TableField(exist = false)
    protected String applicantName;
}
